package controller;

import org.springframework.beans.propertyeditors.StringTrimmerEditor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class Redirection {

	@RequestMapping("/redirectionPanneauAdmin")
	public ModelAndView pageAdmin(){
		return new ModelAndView("redirect:/jsp/membre");
	}
	
	@RequestMapping("/deconnection")
	public ModelAndView deconnection(){
		return new ModelAndView("redirect:/jsp/contenuPage/index");
	}
	@InitBinder
	public void initLogin(WebDataBinder binder) {
		binder.registerCustomEditor(String.class, new StringTrimmerEditor(false));
	}
}
